package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.DataScope;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.EquipManagerMapper;
import com.ruoyi.system.domain.EquipManager;
import com.ruoyi.system.service.IEquipManagerService;

/**
 * managerService业务层处理
 * 
 * @author ruoyi
 * @date 2023-12-17
 */
@Service
public class EquipManagerServiceImpl implements IEquipManagerService 
{
    @Autowired
    private EquipManagerMapper equipManagerMapper;

    /**
     * 查询manager
     * 
     * @param equipId manager主键
     * @return manager
     */
    @Override
    public EquipManager selectEquipManagerByEquipId(Long equipId)
    {
        return equipManagerMapper.selectEquipManagerByEquipId(equipId);
    }

    /**
     * 查询manager列表
     * 
     * @param equipManager manager
     * @return manager
     */
    @Override
    @DataScope(deptAlias = "d", userAlias = "u")
    public List<EquipManager> selectEquipManagerList(EquipManager equipManager)
    {
        return equipManagerMapper.selectEquipManagerList(equipManager);
    }

    /**
     * 新增manager
     * 
     * @param equipManager manager
     * @return 结果
     */
    @Override
    public int insertEquipManager(EquipManager equipManager)
    {
        return equipManagerMapper.insertEquipManager(equipManager);
    }

    /**
     * 修改manager
     * 
     * @param equipManager manager
     * @return 结果
     */
    @Override
    public int updateEquipManager(EquipManager equipManager)
    {
        return equipManagerMapper.updateEquipManager(equipManager);
    }

    /**
     * 批量删除manager
     * 
     * @param equipIds 需要删除的manager主键
     * @return 结果
     */
    @Override
    public int deleteEquipManagerByEquipIds(Long[] equipIds)
    {
        return equipManagerMapper.deleteEquipManagerByEquipIds(equipIds);
    }

    /**
     * 删除manager信息
     * 
     * @param equipId manager主键
     * @return 结果
     */
    @Override
    public int deleteEquipManagerByEquipId(Long equipId)
    {
        return equipManagerMapper.deleteEquipManagerByEquipId(equipId);
    }
}
